﻿@using Probel.PersonalNotes.Models.Home
@{
    ViewBag.Title = "Enregistrement";
    @model RecordViewModel
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<div class="jumbotron">
    <style>
        label {
            width: 110px;
        }

        checkbox {
            width: 110px;
        }
    </style>
    <h1>Nouvelle entrée</h1>
    <p class="lead">Ajouter une nouvelle entrée dans la base de données de statistiques</p>
    @using (Html.BeginForm("Record", "Home", FormMethod.Post))
    {
        <p>
            <label>Code: </label>
            @Html.TextBoxFor(m => m.EventName)
            @Html.ValidationMessageFor(m => m.EventName, string.Empty, new { @class = "text-danger" })
        </p>
        <p>
            <label>Date:</label>
            @Html.EditorFor(m => m.EventDate)
            @Html.ValidationMessageFor(m => m.EventDate, string.Empty, new { @class = "text-danger" })
        </p>
        <p>
            <label>Result:</label>
            @Html.DropDownListFor(m => m.Result, RecordsHelper.Results)
            @Html.ValidationMessageFor(m => m.Result, string.Empty, new { @class = "text-danger" })
        </p>
        <p>
            <label>Doublon:</label>
            @Html.CheckBoxFor(m => m.IsDoubloon)
        </p>
        <input type="submit" value="Enregistrer" class="btn btn-primary btn-lg" />
    }

</div>